import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lily
 * Date: 2024-10-31
 * Time: 22:27
 */
public class test_3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int k = in.nextInt();
            long[] happy = new long[n];
            long[] sad = new long[n];

            for (int i = 0; i < n; i++) {
                happy[i] = in.nextInt();
            }
            for (int i = 0; i < n; i++) {
                sad[i] = in.nextInt();
            }


            int right = 0;
            int left = 0;
            long sum_happy = 0;
            long sum_sad = 0;
            long max_happy = 0;
            long max_sad = Integer.MAX_VALUE;
            int ret = 0;


            for (right = 0; right < n; right++) {
                sum_happy += happy[right];
                sum_sad += sad[right];
                if ((right - left + 1) > k) {
                    sum_happy -= happy[left];
                    sum_sad -= sad[left];
                    left++;
                }

                if ((right - left + 1) == k) {
                    if (sum_happy > max_happy) {
                        ret=left;
                        max_happy = sum_happy;
                        max_sad = sum_sad;
                    }else if ((sum_happy== max_happy) && (sum_sad < max_sad)) {
                        ret=left;
                        max_sad = sum_sad;
                    }
                }
            }
            System.out.println(ret+1);
        }
    }
}
